package com.quwan.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author quan
 * @date 2022-01-15 17:00
 */
@Getter
@AllArgsConstructor
public enum SystemMsgEnum {
    SYSTEM(1, "memberServiceImpl", "getSystemMsgList", "系统消息"),
  //  OTHER(2, "systemMessageServiceImpl", "", "其他"),
    DYNAMIC(3, "memberServiceImpl", "getDynamicMsgList", "广场消息"),
    COMMENT(4, "memberServiceImpl", "getOrderCommentMsgList", "交易评论"),
    PERSONAL(5, "memberServiceImpl", "getPersonalMsgList", "个人消息");
    Integer type;
    String component;
    String method;
    String tips;

    public static SystemMsgEnum getByType(Integer type) {
        for (SystemMsgEnum value : values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}
